{% extends "base.html" %}

{% block title %}ChunkSpace - 首页{% endblock %}

{% block extra_css %}
<style>
    .lab-container {
        background-color: transparent;
        border-radius: 6px;
        padding: 2rem;
        margin-bottom: 2rem;
        box-shadow: none;
    }
    
    .lab-card {
        background-color: var(--light-bg);
        border-radius: 8px;
        border: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        transition: all 0.3s ease;
        height: 100%;
        overflow: hidden;
    }
    
    .lab-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    }
    
    .lab-card.disabled {
        opacity: 0.7;
        pointer-events: none;
    }
    
    .lab-icon {
        width: 64px;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        color: white;
        font-size: 1.8rem;
        margin: 0 auto 1.5rem;
    }
    
    .lab-card-header {
        background-color: var(--primary-color);
        color: white;
        padding: 1rem;
        text-align: center;
        font-weight: 600;
    }
    
    .lab-card-body {
        padding: 1.5rem;
        text-align: center;
    }
    
    .lab-description {
        color: var(--text-muted);
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        height: 60px;
    }
    
    h2 {
        color: var(--primary-color);
    }
</style>
{% endblock %}

{% block content %}
<div class="row mb-4" style="margin-top: 5vh;">
    <div class="col-12"> 
        <div class="lab-container">
            <div class="row g-4">
                <!-- 切片函数管理 -->
                <div class="col-md-4">
                    <div class="lab-card">
                        <div class="lab-card-header" style="background-color: #4a5568;">
                            <i class="fas fa-cogs me-2"></i>Chunk-Func
                        </div>
                        <div class="lab-card-body">
                            <div class="lab-icon" style="background-color: #4a5568;">
                                <i class="fas fa-code"></i>
                            </div>
                            <h5 class="card-title">切片函数管理</h5>
                            <p class="lab-description">管理和上传自定义切片策略，创建和部署新的切片函数。</p>
                            <a href="/chunkfunc" class="btn btn-primary" style="background-color: #4a5568; border-color: #4a5568;">
                                <i class="fas fa-arrow-right me-2"></i>进入工作区
                            </a>
                        </div>
                    </div>
                </div>
                
                <!-- 切片实验室 -->
                <div class="col-md-4">
                    <div class="lab-card">
                        <div class="lab-card-header" style="background-color: #2c3e50;">
                            <i class="fas fa-cut me-2"></i>Chunk-Lab
                        </div>
                        <div class="lab-card-body">
                            <div class="lab-icon" style="background-color: #2c3e50;">
                                <i class="fas fa-cubes"></i>
                            </div>
                            <h5 class="card-title">切片实验室</h5>
                            <p class="lab-description">将不同格式的文档，通过不同的切片策略，进行切片实验。</p>
                            <a href="/chunklab" class="btn btn-primary" style="background-color: #2c3e50; border-color: #2c3e50;">
                                <i class="fas fa-arrow-right me-2"></i>进入工作区
                            </a>
                        </div>
                    </div>
                </div>
                
                <!-- 切片批量ToDify -->
                <div class="col-md-4">
                    <div class="lab-card">
                        <div class="lab-card-header" style="background-color: #34495e;">
                            <i class="fas fa-cloud-upload-alt me-2"></i>Chunk-Go
                        </div>
                        <div class="lab-card-body">
                            <div class="lab-icon" style="background-color: #34495e;">
                                <i class="fas fa-database"></i>
                            </div>
                            <h5 class="card-title">切片批量处理</h5>
                            <p class="lab-description">进行批量文档切片，并批量推送至Dify知识库。</p>
                            <a href="/chunkgo" class="btn btn-primary" style="background-color: #34495e; border-color: #34495e;">
                                <i class="fas fa-arrow-right me-2"></i>进入工作区
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 